package derek.sun;

public class Utils {
	public static Boolean strComIgnoreCase(String s1, String s2) {
		s1 = s1.toLowerCase().trim();
		s2 = s2.toLowerCase().trim();
		char[] c1 = s1.toCharArray();
		char[] c2 = s2.toCharArray();
		if (c1.length == c2.length) {
			for (int i = 0; i < c1.length; i++) {
				if (c1[i] != c2[i]) {
					return false;
				}
			}
			return true;
		} else if (c1.length == c2.length + 1) {
			for (int i = 0; i < c2.length; i++) {
				if (c1[i + 1] != c2[i]) {
					return false;
				}
			}
			return true;
		}
		return false;
	}
}
